-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added logging config #59
Conversation
Warning Rate Limit Exceeded@hunter-bera has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 23 minutes and 47 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. WalkthroughThe recent modifications introduce a more flexible logging configuration to the application. By integrating the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (3)
- cmd/start.go (2 hunks)
- config/config.go (2 hunks)
- log/log.go (3 hunks)
Additional comments: 5
config/config.go (2)
- 5-5: The import of the
log
package aligns with the addition of theLog
field in theConfig
struct, ensuring the necessary types are available.- 24-25: Adding the
Log
field of typelog.LogConfig
to theConfig
struct is a crucial step for integrating the new logging configuration capabilities. This change allows the application's logging behavior to be dynamically configured, enhancing flexibility and maintainability.log/log.go (2)
- 8-8: The import of
github.com/rs/zerolog
is essential for leveraging its structured logging capabilities within the new logging framework. This choice supports efficient and flexible logging.- 38-41: The
LogConfig
struct withFormat
andLevel
fields introduces a structured way to configure logging preferences. This design promotes flexibility and ease of configuration for different logging scenarios.cmd/start.go (1)
- 69-74: The conditional logic for initializing the
logger
based oncfg.Log.Level
andcfg.Log.Format
is a significant improvement, allowing for dynamic configuration of logging behavior. This change enhances the application's flexibility and observability. However, it's important to ensure that thelog.NewWithCfg
andlog.NewBlankLogger
functions are well-documented and tested to handle all expected input scenarios effectively.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (3)
- cmd/start.go (2 hunks)
- config/config.go (2 hunks)
- log/log.go (3 hunks)
Files skipped from review as they are similar to previous changes (3)
- cmd/start.go
- config/config.go
- log/log.go
* Added logging config * lint * format
Summary by CodeRabbit